package com.example.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.bean.CmsRoom;
import com.example.demo.mapper.CmsRoomMapper;

@Service
public class CmsRoomService {
	
	@Autowired
	private CmsRoomMapper roomMapper;
	
	public List<CmsRoom> findAll(){
		return roomMapper.selectAll();
	}
	
	public CmsRoom selectById(String id) {
		return roomMapper.selectByPrimaryKey(id);
	}
	
	public void saveOrUpdate(CmsRoom room) {
		roomMapper.updateByPrimaryKey(room);
	}
	
	public void setStatus() {
		roomMapper.setStatus();
	}
	
}
